<!DOCTYPE html>
<html>

<head>
  <meta charset="UTF-8" />
  <title>01_条件渲染-v-for</title>
  <!-- 引入Vue -->
  <script type="text/javascript" src="../js/vue.js"></script>
</head>

<body>
  <!-- 准备好一个容器-->
  <div id="demo">
    <h1>v-for遍历对象</h1>
    <h3 v-for="(p,index) in arr">{{p.name}}:{{p.age}}--{{p.id}}</h3>
  </div>
</body>

<script type="text/javascript">
  //阻止 vue 在启动时生成生产提示。
  Vue.config.productionTip = false;
  new Vue({
    el: '#demo',
    data: {
      arr: [
        { id: "svdsvds01", name: '王者荣耀', age: 10 },
        { id: "svdsvds02", name: '英雄联盟', age: 8 },
        { id: "svdsvds03", name: 'qq飞车', age: 5 },
        { id: "svdsvds04", name: '穿越火线', age: 3 },
      ]
    }
  })
</script>

</html>